package core.entities;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;


public abstract class AbstractEntity
{
	protected Image sprite;
	protected int w, h;
	protected float x, y, dx, dy;
	
	public AbstractEntity(int x, int y, int w, int h, Image sprite)
	{
		this.x = x;
		this.y = y;
		this.w = w;
		this.h = h;
		this.sprite = sprite;
		dx = 0;
		dy = 0;
	}
	public AbstractEntity(AbstractEntity e)
	{
		this.x = e.x;
		this.y = e.y;
		this.w = e.w;
		this.h = e.h;
		this.sprite = e.sprite;
		dx = 0;
		dy = 0;
	}
	
	public void render(Graphics g)
	{
		
	}
	public void render(Graphics g, float scale)
	{
		
	}
	
	public void update(int delta)
	{
		x += dx * delta / 1000;
		y += dy * delta / 1000;
	}
	
	public void setDX(float DX)
	{
		dx = DX;
	}
	
	public void setDY(float DY)
	{
		dy = DY;
	}
	
	public void setSprite(Image sprite)
	{
		this.sprite = sprite;
	}
	
	public float getDX()
	{
		return dx;
	}
	
	public float getDY()
	{
		return dy;
	}
	
	public void setX(int x)
	{
		this.x = x;
	}
	
	public void setY(int y)
	{
		this.y = y;
	}
	
	public float getX(int x)
	{
		return x;
	}
	
	public float getY(int y)
	{
		return y;
	}
	
	public Image getSprite()
	{
		return sprite;
	}
	
}
